3.2.41 \(\int \frac {a+b \tanh ^{-1}(\frac {c}{x})}{x^3} \, dx\) [141]

Optimal. Leaf size=43 \[ -\frac {b}{2 c x}-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}+\frac {b \tanh ^{-1}\left (\frac {x}{c}\right )}{2 c^2} \]

[Out]

-1/2*b/c/x+1/2*(-a-b*arctanh(c/x))/x^2+1/2*b*arctanh(x/c)/c^2

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6037, 269, 331, 213} \begin {gather*} -\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}+\frac {b \tanh ^{-1}\left (\frac {x}{c}\right )}{2 c^2}-\frac {b}{2 c x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c/x])/x^3,x]

[Out]

-1/2*b/(c*x) - (a + b*ArcTanh[c/x])/(2*x^2) + (b*ArcTanh[x/c])/(2*c^2)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rubi steps

\begin {align*} \int \frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{x^3} \, dx &=-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}-\frac {1}{2} (b c) \int \frac {1}{\left (1-\frac {c^2}{x^2}\right ) x^4} \, dx\\ &=-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}-\frac {1}{2} (b c) \int \frac {1}{x^2 \left (-c^2+x^2\right )} \, dx\\ &=-\frac {b}{2 c x}-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}-\frac {b \int \frac {1}{-c^2+x^2} \, dx}{2 c}\\ &=-\frac {b}{2 c x}-\frac {a+b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}+\frac {b \tanh ^{-1}\left (\frac {x}{c}\right )}{2 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 60, normalized size = 1.40 \begin {gather*} -\frac {a}{2 x^2}-\frac {b}{2 c x}-\frac {b \tanh ^{-1}\left (\frac {c}{x}\right )}{2 x^2}-\frac {b \log (-c+x)}{4 c^2}+\frac {b \log (c+x)}{4 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c/x])/x^3,x]

[Out]

-1/2*a/x^2 - b/(2*c*x) - (b*ArcTanh[c/x])/(2*x^2) - (b*Log[-c + x])/(4*c^2) + (b*Log[c + x])/(4*c^2)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 60, normalized size = 1.40

method result size
derivativedivides \(-\frac {\frac {a \,c^{2}}{2 x^{2}}+\frac {b \,c^{2} \arctanh \left (\frac {c}{x}\right )}{2 x^{2}}+\frac {b c}{2 x}+\frac {b \ln \left (\frac {c}{x}-1\right )}{4}-\frac {b \ln \left (1+\frac {c}{x}\right )}{4}}{c^{2}}\) \(60\)
default \(-\frac {\frac {a \,c^{2}}{2 x^{2}}+\frac {b \,c^{2} \arctanh \left (\frac {c}{x}\right )}{2 x^{2}}+\frac {b c}{2 x}+\frac {b \ln \left (\frac {c}{x}-1\right )}{4}-\frac {b \ln \left (1+\frac {c}{x}\right )}{4}}{c^{2}}\) \(60\)
risch \(-\frac {b \ln \left (x +c \right )}{4 x^{2}}-\frac {i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )+2 i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}-i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{3}-2 i \pi b \,c^{2}-i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}+i \pi b \,c^{2} \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}+i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}-i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{3}-i \pi b \,c^{2} \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}-i \pi b \,c^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )-2 b \,x^{2} \ln \left (x +c \right )+2 b \ln \left (x -c \right ) x^{2}-2 b \ln \left (c -x \right ) c^{2}+4 a \,c^{2}+4 b c x}{8 c^{2} x^{2}}\) \(320\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c/x))/x^3,x,method=_RETURNVERBOSE)

[Out]

-1/c^2*(1/2*a*c^2/x^2+1/2*b*c^2/x^2*arctanh(c/x)+1/2*b*c/x+1/4*b*ln(c/x-1)-1/4*b*ln(1+c/x))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 52, normalized size = 1.21 \begin {gather*} \frac {1}{4} \, {\left (c {\left (\frac {\log \left (c + x\right )}{c^{3}} - \frac {\log \left (-c + x\right )}{c^{3}} - \frac {2}{c^{2} x}\right )} - \frac {2 \, \operatorname {artanh}\left (\frac {c}{x}\right )}{x^{2}}\right )} b - \frac {a}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c/x))/x^3,x, algorithm="maxima")

[Out]

1/4*(c*(log(c + x)/c^3 - log(-c + x)/c^3 - 2/(c^2*x)) - 2*arctanh(c/x)/x^2)*b - 1/2*a/x^2

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 46, normalized size = 1.07 \begin {gather*} -\frac {2 \, a c^{2} + 2 \, b c x + {\left (b c^{2} - b x^{2}\right )} \log \left (-\frac {c + x}{c - x}\right )}{4 \, c^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c/x))/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*a*c^2 + 2*b*c*x + (b*c^2 - b*x^2)*log(-(c + x)/(c - x)))/(c^2*x^2)

________________________________________________________________________________________

Sympy [A]
time = 0.33, size = 44, normalized size = 1.02 \begin {gather*} \begin {cases} - \frac {a}{2 x^{2}} - \frac {b \operatorname {atanh}{\left (\frac {c}{x} \right )}}{2 x^{2}} - \frac {b}{2 c x} + \frac {b \operatorname {atanh}{\left (\frac {c}{x} \right )}}{2 c^{2}} & \text {for}\: c \neq 0 \\- \frac {a}{2 x^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c/x))/x**3,x)

[Out]

Piecewise((-a/(2*x**2) - b*atanh(c/x)/(2*x**2) - b/(2*c*x) + b*atanh(c/x)/(2*c**2), Ne(c, 0)), (-a/(2*x**2), T
rue))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (37) = 74\).
time = 0.41, size = 123, normalized size = 2.86 \begin {gather*} -\frac {\frac {b {\left (c + x\right )} \log \left (-\frac {c + x}{c - x}\right )}{{\left (\frac {{\left (c + x\right )}^{2} c}{{\left (c - x\right )}^{2}} - \frac {2 \, {\left (c + x\right )} c}{c - x} + c\right )} {\left (c - x\right )}} - \frac {b - \frac {2 \, a {\left (c + x\right )}}{c - x} - \frac {b {\left (c + x\right )}}{c - x}}{\frac {{\left (c + x\right )}^{2} c}{{\left (c - x\right )}^{2}} - \frac {2 \, {\left (c + x\right )} c}{c - x} + c}}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c/x))/x^3,x, algorithm="giac")

[Out]

-(b*(c + x)*log(-(c + x)/(c - x))/(((c + x)^2*c/(c - x)^2 - 2*(c + x)*c/(c - x) + c)*(c - x)) - (b - 2*a*(c +
x)/(c - x) - b*(c + x)/(c - x))/((c + x)^2*c/(c - x)^2 - 2*(c + x)*c/(c - x) + c))/c

________________________________________________________________________________________

Mupad [B]
time = 0.71, size = 49, normalized size = 1.14 \begin {gather*} \frac {b\,c\,\mathrm {atan}\left (\frac {x}{\sqrt {-c^2}}\right )}{2\,{\left (-c^2\right )}^{3/2}}-\frac {b}{2\,c\,x}-\frac {b\,\mathrm {atanh}\left (\frac {c}{x}\right )}{2\,x^2}-\frac {a}{2\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c/x))/x^3,x)

[Out]

(b*c*atan(x/(-c^2)^(1/2)))/(2*(-c^2)^(3/2)) - b/(2*c*x) - (b*atanh(c/x))/(2*x^2) - a/(2*x^2)

________________________________________________________________________________________